package com.gupaoedu.demo.mvc.action;

import com.gupaoedu.mvcframework.annotation.GPController;
import com.gupaoedu.mvcframework.annotation.GPRequestMapping;
import com.gupaoedu.mvcframework.annotation.GPRequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@GPController
@GPRequestMapping("/hello")
public class TestController {

    @GPRequestMapping("/say")
    public void say(HttpServletRequest req, HttpServletResponse resp, @GPRequestParam("name") String name) {
        try {
            resp.getWriter().write(name);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
